package com.personal.kousuan.factory;

import java.util.HashMap;
import java.util.Map;

import com.personal.kousuan.generator.questionlist.GeneralKouSuanQuestionGenerator;
import com.personal.kousuan.generator.questionlist.KouSuanQuestionsGenerator;

public class KouSuanQuestionsGeneratorFactory {

	private static KouSuanQuestionsGeneratorFactory instance;
	private KouSuanQuestionsGeneratorFactory(){}
	public static final String GRADE1_SEMESTER1_PLUS_WITHIN_10 = "1";
	public static final String GRADE1_SEMESTER1_MINUS_WITHIN_10 = "2";
	public static final String GRADE1_SEMESTER1_PLUS_MINUS_WITHIN_10 = "3";
	public static final String GRADE1_SEMESTER1_CONT_PLUS_WITHIN_10 = "4";
	public static final String GRADE1_SEMESTER1_CONT_MINUS_WITHIN_10 = "5";
	public static final String GRADE1_SEMESTER1_CONT_PLUS_MINUS_WITHIN_10 = "6";
	public static final String GRADE1_SEMESTER1_BUJINWEI_PLUS_WITHIN_20 = "7";
	public static final String GRADE1_SEMESTER1_BUTUIWEI_MINUS_WITHIN_20 = "8";
	public static final String GRADE1_SEMESTER1_BUJINBUTUI_PLUS_MINUS_WITHIN_20 = "9";
	public static final String GRADE1_SEMESTER1_JINWEI_PLUS_WITHIN_20 = "10";
	public static final String GRADE1_SEMESTER1_TUIWEI_MINUS_WITHIN_20 = "11";
	public static final String GRADE1_SEMESTER1_JINTUI_PLUS_MINUS_WITHIN_20 = "12";
	public static final String GRADE1_SEMESTER1_PLUS_MINUS_WITHIN_20 = "13";
	public static final String GRADE1_SEMESTER1_CONT_PLUS_WITHIN_20 = "14";
	public static final String GRADE1_SEMESTER1_CONT_MINUS_WITHIN_20 = "15";
	public static final String GRADE1_SEMESTER1_CONT_PLUS_MINUS_WITHIN_20 = "16";
	public static final String GRADE1_SEMESTER1= "17";
	
	public static final String GRADE1_SEMESTER2_BUJINWEI_PLUS_WHOLEDOZEN_WITHIN_100 = "18";
	public static final String GRADE1_SEMESTER2_BUJINWEI_PLUS_ONEDIGIT_WITHIN_100 = "19";
	public static final String GRADE1_SEMESTER2_BUJINWEI_PLUS_100 = "20";
	public static final String GRADE1_SEMESTER2_BUTUIWEI_MINUS_WHOLEDOZEN_WITHIN_100 = "21";
	public static final String GRADE1_SEMESTER2_BUTUIWEI_MINUS_ONEDIGIT_WITHIN_100 = "22";
	public static final String GRADE1_SEMESTER2_BUTUIWEI_MINUS_100 = "23";
	public static final String GRADE1_SEMESTER2_BUJINBUTUI_PLUS_MINUS_WITHIN_100 = "24";
	public static final String GRADE1_SEMESTER2_JINWEI_PLUS_ONEDIGIT_WITHIN_100 = "25";
	public static final String GRADE1_SEMESTER2_TUIWEI_MINUS_ONEDIGIT_WITHIN_100 = "26";
	public static final String GRADE1_SEMESTER2_JINTUI_PLUS_MINUS_WITHIN_100 = "27";
	public static final String GRADE1_SEMESTER2_JINTUI_PLUS_MINUS_TWODIGIT_WITHIN_100 = "28";
	public static final String GRADE1_SEMESTER2_CONT_PLUS_WITHIN_100 = "29";
	public static final String GRADE1_SEMESTER2_CONT_MINUS_WITHIN_100 = "30";
	public static final String GRADE1_SEMESTER2_CONT_PLUS_MINUS_WITHIN_100 = "31";
	public static final String GRADE1_SEMESTER2_WITHIN_100= "32";
	
	public static final String GRADE2_SEMESTER1_MULTI = "33";
	public static final String GRADE2_SEMESTER1_DIVID = "34";
	public static final String GRADE2_SEMESTER1_MULTI_DIVID = "35";
	public static final String GRADE2_SEMESTER1_CONT_MULTI = "36";
	public static final String GRADE2_SEMESTER1_CONT_DIVID = "37";
	public static final String GRADE2_SEMESTER1_CONT_MULTI_DIVID = "38";
	public static final String GRADE2_SEMESTER1_CONT_MULTI_DIVID_2 = "39";
	public static final String GRADE2_SEMESTER1_MULTI_PLUS_MINUS_BUJINBUTUI = "40";
	public static final String GRADE2_SEMESTER1_MULTI_PLUS_MINUS_JINTUI = "41";
	public static final String GRADE2_SEMESTER1_DIVID_PLUS_MINUS_BUJINBUTUI = "42";
	public static final String GRADE2_SEMESTER1_DIVID_PLUS_MINUS_JINTUI = "43";
	public static final String GRADE2_SEMESTER1_MULTI_DIVID_PLUS_MINUS = "44";
	
	public static final String GRADE2_SEMESTER2_PLUS_MINUS_HUNDERD = "45";
	public static final String GRADE2_SEMESTER2_PLUS_BUJINWEI_HUNDERD_TEN = "46";
	public static final String GRADE2_SEMESTER2_PLUS_JINWEI_TEN = "47";
	public static final String GRADE2_SEMESTER2_PLUS_JINWEI_HUNDERD_TEN = "48";
	public static final String GRADE2_SEMESTER2_MINUS_BUTUIWEI_HUNDERD_TEN = "49";
	public static final String GRADE2_SEMESTER2_MINUS_TUIWEI_HUNDERD_TEN = "50";
	public static final String GRADE2_SEMESTER2_HUNDERD_TEN = "51";
	

	
	private static Map<String,String[]> kousuanGenerateMap = new HashMap<String,String[]>();
	static{
		kousuanGenerateMap.put(GRADE1_SEMESTER1_PLUS_WITHIN_10,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_PLUS_WITHIN_10}); 
		kousuanGenerateMap.put(GRADE1_SEMESTER1_MINUS_WITHIN_10,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_MINUS_WITHIN_10});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_PLUS_MINUS_WITHIN_10,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_PLUS_WITHIN_10,KouSuanGeneratorFactory.GRADE1_SEMESTER1_MINUS_WITHIN_10});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_CONT_PLUS_WITHIN_10,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_PLUS_WITHIN_10});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_CONT_MINUS_WITHIN_10,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_MINUS_WITHIN_10});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_CONT_PLUS_MINUS_WITHIN_10,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_MINUS_WITHIN_10,KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_PLUS_WITHIN_10});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_BUJINWEI_PLUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUJINWEI_PLUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_BUTUIWEI_MINUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUTUIWEI_MINUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_BUJINBUTUI_PLUS_MINUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUJINWEI_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUTUIWEI_MINUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_JINWEI_PLUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_JINWEI_PLUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_TUIWEI_MINUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_TUIWEI_MINUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_JINTUI_PLUS_MINUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_JINWEI_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_TUIWEI_MINUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_PLUS_MINUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUJINWEI_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUTUIWEI_MINUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_JINWEI_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_TUIWEI_MINUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_CONT_PLUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_PLUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_CONT_MINUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_MINUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1_CONT_PLUS_MINUS_WITHIN_20,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_MINUS_WITHIN_20});
		kousuanGenerateMap.put(GRADE1_SEMESTER1,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUJINWEI_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_BUTUIWEI_MINUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_JINWEI_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_TUIWEI_MINUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_PLUS_WITHIN_20,KouSuanGeneratorFactory.GRADE1_SEMESTER1_CONT_MINUS_WITHIN_20});
		
		kousuanGenerateMap.put(GRADE1_SEMESTER2_BUJINWEI_PLUS_WHOLEDOZEN_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_WHOLEDOZEN_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_BUJINWEI_PLUS_ONEDIGIT_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_BUJINWEI_PLUS_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_WHOLEDOZEN_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_BUTUIWEI_MINUS_WHOLEDOZEN_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_WHOLEDOZEN_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_BUTUIWEI_MINUS_ONEDIGIT_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_BUTUIWEI_MINUS_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_WHOLEDOZEN_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_BUJINBUTUI_PLUS_MINUS_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_WHOLEDOZEN_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_ONEDIGIT_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_WHOLEDOZEN_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_JINWEI_PLUS_ONEDIGIT_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_JINWEI_PLUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_TUIWEI_MINUS_ONEDIGIT_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_TUIWEI_MINUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_JINTUI_PLUS_MINUS_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_JINWEI_PLUS_ONEDIGIT_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_TUIWEI_MINUS_ONEDIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_JINTUI_PLUS_MINUS_TWODIGIT_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_JINWUI_PLUS_TWODIGIT_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_TUIWEI_MINUS_TWODIGIT_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_CONT_PLUS_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_CONT_PLUS_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_CONT_MINUS_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_CONT_MINUS_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_CONT_PLUS_MINUS_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_CONT_PLUS_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_CONT_MINUS_WITHIN_100});
		kousuanGenerateMap.put(GRADE1_SEMESTER2_WITHIN_100,new String[]{KouSuanGeneratorFactory.GRADE1_SEMESTER2_CONT_PLUS_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_CONT_MINUS_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_JINWEI_PLUS_ONEDIGIT_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_TUIWEI_MINUS_ONEDIGIT_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_WHOLEDOZEN_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUJINWEI_PLUS_ONEDIGIT_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_WHOLEDOZEN_WITHIN_100,KouSuanGeneratorFactory.GRADE1_SEMESTER2_BUTUIWEI_MINUS_ONEDIGIT_WITHIN_100});
		
		kousuanGenerateMap.put(GRADE2_SEMESTER1_MULTI,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_MULTI});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_DIVID,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_DIVID});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_MULTI_DIVID,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_MULTI,KouSuanGeneratorFactory.GRADE2_SEMESTER1_DIVID});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_CONT_MULTI,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_CONT_MULTI});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_CONT_DIVID,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_CONT_DIVID});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_CONT_MULTI_DIVID,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_CONT_MULTI,KouSuanGeneratorFactory.GRADE2_SEMESTER1_CONT_DIVID});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_CONT_MULTI_DIVID_2,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_CONT_MULTI,KouSuanGeneratorFactory.GRADE2_SEMESTER1_CONT_DIVID});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_MULTI_PLUS_MINUS_BUJINBUTUI,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_MULTI_PLUS_MINUS_BUJINBUTUI});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_MULTI_PLUS_MINUS_JINTUI,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_MULTI_PLUS_MINUS_JINTUI});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_DIVID_PLUS_MINUS_BUJINBUTUI,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_DIVID_PLUS_MINUS_BUJINBUTUI});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_DIVID_PLUS_MINUS_JINTUI,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_DIVID_PLUS_MINUS_JINTUI});
		kousuanGenerateMap.put(GRADE2_SEMESTER1_MULTI_DIVID_PLUS_MINUS,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER1_MULTI_PLUS_MINUS_BUJINBUTUI,KouSuanGeneratorFactory.GRADE2_SEMESTER1_MULTI_PLUS_MINUS_JINTUI,KouSuanGeneratorFactory.GRADE2_SEMESTER1_DIVID_PLUS_MINUS_BUJINBUTUI,KouSuanGeneratorFactory.GRADE2_SEMESTER1_DIVID_PLUS_MINUS_JINTUI});
		
		kousuanGenerateMap.put(GRADE2_SEMESTER2_PLUS_MINUS_HUNDERD,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_MINUS_HUNDERD});
		kousuanGenerateMap.put(GRADE2_SEMESTER2_PLUS_BUJINWEI_HUNDERD_TEN,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_BUJINWEI_HUNDERD_TEN});
		kousuanGenerateMap.put(GRADE2_SEMESTER2_PLUS_JINWEI_TEN,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_JINWEI_TEN});
		kousuanGenerateMap.put(GRADE2_SEMESTER2_PLUS_JINWEI_HUNDERD_TEN,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_JINWEI_HUNDERD_TEN});
		kousuanGenerateMap.put(GRADE2_SEMESTER2_MINUS_BUTUIWEI_HUNDERD_TEN,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER2_MINUS_BUTUIWEI_HUNDERD_TEN});
		kousuanGenerateMap.put(GRADE2_SEMESTER2_MINUS_TUIWEI_HUNDERD_TEN,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER2_MINUS_TUIWEI_HUNDERD_TEN});
		kousuanGenerateMap.put(GRADE2_SEMESTER2_HUNDERD_TEN,new String[]{KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_MINUS_HUNDERD,KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_BUJINWEI_HUNDERD_TEN,KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_JINWEI_TEN,KouSuanGeneratorFactory.GRADE2_SEMESTER2_PLUS_JINWEI_HUNDERD_TEN,KouSuanGeneratorFactory.GRADE2_SEMESTER2_MINUS_BUTUIWEI_HUNDERD_TEN,KouSuanGeneratorFactory.GRADE2_SEMESTER2_MINUS_TUIWEI_HUNDERD_TEN});
	}
	public static KouSuanQuestionsGeneratorFactory getInstance(){
		if(instance == null){
			instance = new KouSuanQuestionsGeneratorFactory();
		}
		return instance;
	}
	
	public String[] getKouSuanGenerator(String key){
		return kousuanGenerateMap.get(key);
	}
}
